package com.example.computer_exam_training_sys.service.impl;

import com.example.computer_exam_training_sys.service.QuestionGenService;
import com.example.computer_exam_training_sys.ultils.BaiduTokenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.net.SocketTimeoutException;

@Service
public class QuestionGenServiceImpl implements QuestionGenService {

    @Autowired
    private BaiduTokenUtil baiduTokenUtil;

    @Override
    public String generateQuestion(String query) throws SocketTimeoutException {
        return baiduTokenUtil.getAnswer(query);
    }
}


